package pl.planito.entity;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the inv_hardware database table.
 * 
 */
@Embeddable
public class InvHardwarePK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="idinv_hardware")
	private int idinvHardware;

	@Column(name="inventory_id_hard")
	private int inventoryIdHard;

	@Column(name="inventory_inv_id_hard")
	private String inventoryInvIdHard;

    public InvHardwarePK() {
    }
	public int getIdinvHardware() {
		return this.idinvHardware;
	}
	public void setIdinvHardware(int idinvHardware) {
		this.idinvHardware = idinvHardware;
	}
	public int getInventoryIdHard() {
		return this.inventoryIdHard;
	}
	public void setInventoryIdHard(int inventoryIdHard) {
		this.inventoryIdHard = inventoryIdHard;
	}
	public String getInventoryInvIdHard() {
		return this.inventoryInvIdHard;
	}
	public void setInventoryInvIdHard(String inventoryInvIdHard) {
		this.inventoryInvIdHard = inventoryInvIdHard;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof InvHardwarePK)) {
			return false;
		}
		InvHardwarePK castOther = (InvHardwarePK)other;
		return 
			(this.idinvHardware == castOther.idinvHardware)
			&& (this.inventoryIdHard == castOther.inventoryIdHard)
			&& this.inventoryInvIdHard.equals(castOther.inventoryInvIdHard);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idinvHardware;
		hash = hash * prime + this.inventoryIdHard;
		hash = hash * prime + this.inventoryInvIdHard.hashCode();
		
		return hash;
    }
}